﻿<%@ Page Language="C#" MasterPageFile="~/INFTUR.master" AutoEventWireup="true" CodeBehind="ManterLocadora.aspx.cs" Inherits="INFTUR.ManterLocadora" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="principal" style="width:400px">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id = "consulta" style="width:400px">
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" 
                style="margin-top: 0px">
                <Columns>
                    <asp:TemplateField HeaderText="Deletar">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbDeletar" runat="server" onclick="lbDeletar_Click">Deletar</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                    <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                    <asp:BoundField DataField="Site" HeaderText="Site" SortExpression="Site" />
                    <asp:BoundField DataField="Telefone" HeaderText="Telefone" 
                        SortExpression="Telefone" />
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                    <asp:BoundField DataField="Endereco" HeaderText="Endereco" 
                        SortExpression="Endereco" />
                    <asp:TemplateField HeaderText="Atualizar">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbAtualizar" runat="server" onclick="lbAtualizar_Click">Atualizar</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                DataObjectTypeName="Negocios.LocadoraBO" DeleteMethod="remover" 
                InsertMethod="inserir" OldValuesParameterFormatString="original_{0}" 
                SelectMethod="consultaTodos" TypeName="Negocios.LocadoraBOMetodos" 
                UpdateMethod="atualizar">
                <DeleteParameters>
                    <asp:Parameter Name="id" Type="Int32" />
                </DeleteParameters>
            </asp:ObjectDataSource>
         </div>
    
        <div id="cadastro" class="divDados" style="width:400px">
            <table>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lbErro" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        Id</td>
                    <td>
                        <asp:TextBox ID="tbId" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Nome</td>
                    <td>
                        <asp:TextBox ID="tbNome" runat="server" Enabled="False"></asp:TextBox>
&nbsp;&nbsp;
                        <asp:Button ID="btNovo" runat="server" onclick="btNovo_Click1" Text="Novo" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Site</td>
                    <td>
                        <asp:TextBox ID="tbSite" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Telefone</td>
                    <td>
                        <asp:TextBox ID="tbTelefone" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Email</td>
                    <td>
                        <asp:TextBox ID="tbEmail" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Endereco</td>
                    <td>
                        <asp:TextBox ID="tbEndereco" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btGravar" runat="server" Enabled="False" 
                            onclick="btGravar_Click" Text="Gravar" />
&nbsp;
                        <asp:Button ID="btCancelar" runat="server" Enabled="False" 
                            onclick="btCancelar_Click" Text="Cancelar" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>